package cn.bb.entity;

import cn.bb.util.LogUtil;
import cn.bb.util.OutOfStockException;

public class PhoneBizImplProxy implements PhoneBiz {
    private PhoneBiz phoneBiz = new PhoneBizImpl();
    private LogUtil logUtil = new LogUtil();
    @Override
    public void buyPhone(int num) {
        phoneBiz.buyPhone(num);
        logUtil.log("buyPhone",num);
    }

    @Override
    public void salePhone(int num) throws OutOfStockException {
        phoneBiz.salePhone(num);
        logUtil.log("salePhone",num);
    }
}
